Data Object Reference
This document provides a quick reference for the data structures used in the Velolink API. For detailed field definitions and GraphQL schemas, refer to the following documentation:
- Historical Data - Complete vehicle state history
- Journeys - Completed trips and rides
- Events - Significant feature-related occurrences
- Latest Data - Current vehicle states (same structure as real-time data)
Below are example data structures and field descriptions for each type:
Historical Data
Historical data provides a record of vehicle states and feature usage over time. The data is returned in JSON format with the following structure:
{
"data": {
"historical": [
{
"dataId": "132147",
"namespace": "valleytransport",
"operator": "SC",
"vehicleId": "188",
"featureData": {
"cyclist": {
"type": "cyclist",
"used": 1,
"rideEnd": false,
"capacity": 3,
"deployed": true,
"available": 2,
"rideStart": false
},
"priority": {
"type": "priority",
"used": 1,
"rideEnd": false,
"capacity": 2,
"available": 1,
"rideStart": false
}
},
"features": null,
"routeId": "40",
"tripId": "3754397",
"lat": 37.40210723876953,
"long": -122.07848358154297,
"vehicleLat": 37.400856018066406,
"vehicleLong": -122.07989501953125,
"stopId": "65913",
"stopSequence": 36,
"stopLat": 37.403458,
"stopLong": -122.078255,
"timestamp": 1745971272404,
"tod": "evening",
"tzHour": 17,
"tz": "America/Los_Angeles"
}
]
}
}
Data Fields
data.historical: Array of historical data points- For each data point:
dataId: Unique identifier for the data pointnamespace: Organization namespaceoperator: Transit operator namevehicleId: Unique identifier for the vehiclefeatureData: Detailed feature information:cyclist: Bicycle rack informationtype: Feature type identifierused: Number of spots in userideEnd: Boolean indicating end of ridecapacity: Total bicycle capacitydeployed: Boolean indicating if rack is deployedavailable: Number of available spotsrideStart: Boolean indicating start of ride
priority: Priority seating informationtype: Feature type identifierused: Number of priority seats in userideEnd: Boolean indicating end of ridecapacity: Total priority seating capacityavailable: Number of available priority seatsrideStart: Boolean indicating start of ride
features: Array of available features (may be null)routeId: Current route identifier (may be empty string if not on route)tripId: Current trip identifier (may be empty string if not on trip)lat: Latitude coordinate of the data pointlong: Longitude coordinate of the data pointvehicleLat: Vehicle's actual latitude coordinate from GTFSRTvehicleLong: Vehicle's actual longitude coordinate from GTFSRTstopId: Current stop identifier (may be empty string if not at stop)stopSequence: Stop sequence number on the routestopLat: Stop's latitude coordinatestopLong: Stop's longitude coordinatetimestamp: Unix timestamp of the data pointtod: Time of day category (e.g., "evening")tzHour: Hour in the local timezonetz: Timezone identifier
- All coordinates are in decimal degrees
- Timestamps are Unix timestamps in milliseconds
- Empty route, trip, and stop IDs indicate the vehicle is not currently in service or at a stop
- Feature status (deployed, rideStart, rideEnd) helps track usage patterns
- Time of day (tod) and timezone information helps with temporal analysis
Journeys
Journeys data provides information about completed trips or rides for specific features (cyclist or priority). The data is returned in JSON format with the following structure:
{
"data": {
"journeys": [
{
"beginLat": 37.327766,
"beginLong": -121.89366,
"beginStopId": "64745",
"beginTimestamp": "1745973072045",
"beginTod": "evening",
"beginTz": "America/Los_Angeles",
"beginTzHour": 17,
"beginmarkerid": null,
"beginmarkerlat": 0,
"beginmarkerlong": 0,
"beginmarkername": null,
"beginmarkerradius": 0,
"distanceMeters": 4798.7915505433575,
"durationMinutes": 180,
"endLat": 37.36772918701172,
"endLong": -121.91415405273438,
"endStopId": "",
"endTimestamp": "1745983872137",
"endTod": "night",
"endTz": "America/Los_Angeles",
"endTzHour": 20,
"endmarkerid": "01929109-cd3c-7337-8736-29eb07ec1b49",
"endmarkerlat": 37.36333564420217,
"endmarkerlong": -121.92888453145503,
"endmarkername": "SJC Airport",
"endmarkerradius": 1931,
"journeyId": "0196841a-e6d0-777d-8fdc-422e4436173a",
"namespace": "valleytransport",
"operator": "SC",
"routeId": "Blue Line",
"tripId": "3771147",
"type": "priority",
"vehicleId": "915"
}
]
}
}
Data Fields
data.journeys: Array of journey records- For each journey:
journeyId: Unique identifier for the journeynamespace: Organization namespaceoperator: Transit operator namevehicleId: Vehicle identifiertype: Type of journey ("cyclist" or "priority")routeId: Route identifiertripId: Trip identifierdistanceMeters: Total distance traveled in metersdurationMinutes: Duration of the journey in minutes- Begin location information:
beginLat: Starting latitudebeginLong: Starting longitudebeginStopId: Starting stop identifier (may be null)beginTimestamp: Journey start timestampbeginTod: Time of day at startbeginTz: Timezone at startbeginTzHour: Hour in local timezone at startbeginmarkerid: Starting marker identifier (may be null)beginmarkerlat: Starting marker latitudebeginmarkerlong: Starting marker longitudebeginmarkername: Starting marker namebeginmarkerradius: Starting marker radius in meters
- End location information:
endLat: Ending latitudeendLong: Ending longitudeendStopId: Ending stop identifier (may be empty string)endTimestamp: Journey end timestampendTod: Time of day at endendTz: Timezone at endendTzHour: Hour in local timezone at endendmarkerid: Ending marker identifierendmarkerlat: Ending marker latitudeendmarkerlong: Ending marker longitudeendmarkername: Ending marker nameendmarkerradius: Ending marker radius in meters
- All coordinates are in decimal degrees
- Timestamps are Unix timestamps in milliseconds
- Empty stop IDs indicate the journey didn't start/end at a designated stop
- Marker information provides context about specific locations (e.g., airports, stations)
- Journey type indicates whether it was a cyclist or priority seating journey
- Distance and duration help analyze journey patterns and efficiency
Latest Data
Latest data provides the most recent state of all vehicles in your namespace. The data is returned in JSON format with the following structure:
{
"data": {
"latest": {
"133": {
"vehicleId": "133",
"namespace": "valleytransport",
"operator": "SC",
"routeId": "60",
"tripId": "3759521",
"features": ["cyclist", "priority"],
"featureData": {
"cyclist": {
"deployed": false,
"capacity": 3,
"available": 3,
"used": 0,
"type": "cyclist",
"rideStart": false,
"rideEnd": false
},
"priority": {
"capacity": 2,
"available": 2,
"used": 0,
"type": "priority",
"rideStart": false,
"rideEnd": false
}
},
"lat": 37.405662536621094,
"long": -121.89591217041016,
"timestamp": "2025-05-01T18:01:16.941Z",
"events": []
}
}
}
}
Data Fields
data.latest: Object containing vehicle data, keyed by vehicle ID- For each vehicle:
vehicleId: Unique identifier for the vehiclenamespace: Organization namespaceoperator: Transit operator namerouteId: Current route identifier (may be empty string if not on route)tripId: Current trip identifier (may be empty string if not on trip)features: Array of available features (e.g., ["cyclist", "priority"])featureData: Detailed feature information:cyclist: Bicycle rack informationdeployed: Boolean indicating if rack is deployedcapacity: Total bicycle capacityavailable: Number of available spotsused: Number of spots in usetype: Feature type identifierrideStart: Boolean indicating start of riderideEnd: Boolean indicating end of ride
priority: Priority seating informationcapacity: Total priority seating capacityavailable: Number of available priority seatsused: Number of priority seats in usetype: Feature type identifierrideStart: Boolean indicating start of riderideEnd: Boolean indicating end of ride
lat: Latitude coordinatelong: Longitude coordinatetimestamp: UTC timestamp of the data pointevents: Array of recent events for the vehicle
- All timestamps are in ISO 8601 format with UTC timezone
- The data represents the most recent state for all vehicles in your namespace
- Vehicles may have multiple features (e.g., cyclist racks and priority seating)
- Empty route and trip IDs indicate the vehicle is not currently in service
- Feature status (deployed, rideStart, rideEnd) helps track usage patterns
Events
Events data provides information about significant occurrences related to vehicle features. The data is returned in JSON format with the following structure:
{
"data": {
"events": [
{
"eventId": "0196841a-e6d0-777d-8fdc-422e4436173a",
"eventType": "Cyclist-Rack-Full",
"lat": 37.40210723876953,
"long": -122.07848358154297,
"namespace": "valleytransport",
"routeId": "Blue Line",
"timestamp": "2025-05-01T18:01:16.941Z",
"vehicleId": "915",
"tripId": "3771147"
}
]
}
}
Data Fields
data.events: Array of event records- For each event:
eventId: Unique identifier for the eventeventType: Type of event (e.g., "Cyclist-Rack-Full")lat: Latitude coordinate at event timelong: Longitude coordinate at event timenamespace: Organization namespacerouteId: Route identifiertimestamp: UTC timestamp of the eventvehicleId: Vehicle identifiertripId: Trip identifier
- All coordinates are in decimal degrees
- Timestamps are in ISO 8601 format with UTC timezone
- Event types indicate specific conditions or state changes (e.g., rack full, ride start/end)